package com.threadmethod;

/**
 * @PackageName:com.threadmethod
 * @ClassName:SubThread
 * @Description:  定义一个线程类
 * @Author: zhangxiaoyu
 * @date 2020/11/18 15:01
 */
public class SubThread  extends Thread{

    public SubThread(){
        System.out.println("构造方法打印当前线程的名称："+Thread.currentThread().getName());
    }

    @Override
    public void run() {
        System.out.println("run方法打印当前的线程名称："+Thread.currentThread().getName());

    }
}
